Srcs := $(wildcard *.c)
Exes :=$(patsubst %.c,%,$(Srcs))
CC:= gcc
CFLAGS := -Wall -g
ALL:$(Exes) 
%: %.c
	$(CC) $^ -o $@ $(CFLAGS)
.PHONY:ALL clean rebuild  
clean:
	$(RM) $(Exes)
rebuild: clean ALL